package com.example.cat.catwidget.Server;

import android.app.Application;
import android.content.Context;

import com.umeng.commonsdk.UMConfigure;


/**
 * Created by cat on 2018/4/26.
 */

public class MyApplication extends Application {
    private static MyApplication instance;
    private static Context Tempcontent;
    public static MyApplication getInstance() {
        return instance;
    }

    /**
     * 获取全局上下文
     */
    public static Context getContext() {
        return Tempcontent;
    }

    @Override
    public void onCreate() {
        super.onCreate();

        Tempcontent = getApplicationContext();
        /**
         * 初始化common库
         * 参数1:上下文，不能为空
         * 参数2:设备类型，UMConfigure.DEVICE_TYPE_PHONE为手机、UMConfigure.DEVICE_TYPE_BOX为盒子，默认为手机
         * 参数3:Push推送业务的secret
         */
        UMConfigure.init(this, "58e77f5d3eae2539bc000621", "MFace", UMConfigure.DEVICE_TYPE_PHONE, "");

    }
}
